<template>
  <div class="hello">
    <h1>关于</h1>
    <button @click="getTime">about界面</button>
    <p>{{ time }}</p>
  </div>
</template>

<script>
import moment from 'moment'
export default {
  name: "about",
  methods: {
    getTime() {
      let time = new Date();
      let stamp = time.getTime();
      console.log(stamp);
      var tempTime = moment.duration(stamp);   
      console.log(tempTime);
      let week = tempTime.weeks()
      console.log("星期"+week);
 moment.unix(1581767732).format("YYYY.MM.DD hh:mm:ss");
      let just = moment(stamp).format("dddd, MMMM Do YYYY, h:mm:ss a");
      let swit = moment(1628812800).format("星期d M月D日");
      console.log(swit);
      console.log(just);
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
